
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module astar</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>astar</strong></big></big> (11 de Maio de 2014)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/emanuelteixeira/Desktop/Eda/src/astar.py">/Users/emanuelteixeira/Desktop/Eda/src/astar.py</a></font></td></tr></table>
    <p><tt>Algoritmo&nbsp;A*&nbsp;Path&nbsp;Finding&nbsp;para&nbsp;a&nbsp;<br>
procura&nbsp;de&nbsp;caminhos&nbsp;com&nbsp;menos&nbsp;custo&nbsp;<br>
em&nbsp;funcao&nbsp;da&nbsp;intensidade.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="astar.html#AStar">AStar</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AStar">class <strong>AStar</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Classe&nbsp;<a href="#AStar">AStar</a>&nbsp;e&nbsp;responsavel&nbsp;pelo&nbsp;algoritmo&nbsp;da&nbsp;busca<br>
do&nbsp;melhor&nbsp;caminho&nbsp;com&nbsp;menos&nbsp;custo<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="AStar-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Inicializacao&nbsp;dos&nbsp;parametros&nbsp;da&nbsp;classe&nbsp;Astar</tt></dd></dl>

<dl><dt><a name="AStar-a_star"><strong>a_star</strong></a>(self, img)</dt><dd><tt>Funcao&nbsp;A*&nbsp;que&nbsp;busca&nbsp;o&nbsp;melhor&nbsp;caminho&nbsp;<br>
utilizando&nbsp;a&nbsp;soma&nbsp;das&nbsp;funcoes&nbsp;g&nbsp;e&nbsp;h&nbsp;para&nbsp;um&nbsp;conjuto&nbsp;<br>
de&nbsp;pontos&nbsp;e&nbsp;escolhendo&nbsp;o&nbsp;ponto&nbsp;que&nbsp;apresenta&nbsp;um&nbsp;custo&nbsp;mais&nbsp;baixo<br>
&nbsp;<br>
@param&nbsp;img&nbsp;e&nbsp;a&nbsp;matriz&nbsp;da&nbsp;imagem&nbsp;a&nbsp;testar&nbsp;com&nbsp;o&nbsp;valor&nbsp;dos&nbsp;pixeis</tt></dd></dl>

<dl><dt><a name="AStar-g"><strong>g</strong></a>(self, neighbor)</dt><dd><tt>Funcao&nbsp;com&nbsp;o&nbsp;custo&nbsp;g,&nbsp;em&nbsp;funcao&nbsp;da&nbsp;intesndidade&nbsp;da&nbsp;cor<br>
Quanto&nbsp;maior&nbsp;for&nbsp;a&nbsp;intensidade&nbsp;menor&nbsp;sera&nbsp;o&nbsp;custo<br>
&nbsp;<br>
@param&nbsp;neighbor&nbsp;e&nbsp;o&nbsp;ponto&nbsp;vizinho&nbsp;que&nbsp;esta&nbsp;a&nbsp;ser&nbsp;testado&nbsp;<br>
@return&nbsp;a&nbsp;normalizacao&nbsp;da&nbsp;cor&nbsp;entre&nbsp;0&nbsp;e&nbsp;1&nbsp;do&nbsp;ponto&nbsp;neighbor</tt></dd></dl>

<dl><dt><a name="AStar-h"><strong>h</strong></a>(self, neighbor)</dt><dd><tt>Funcao&nbsp;com&nbsp;o&nbsp;custo&nbsp;h,&nbsp;em&nbsp;funcao&nbsp;da&nbsp;distancia&nbsp;em&nbsp;linha&nbsp;recta&nbsp;ao&nbsp;ponto&nbsp;final<br>
Quanto&nbsp;maior&nbsp;for&nbsp;a&nbsp;distancia&nbsp;maior&nbsp;sera&nbsp;o&nbsp;custo<br>
&nbsp;<br>
@param&nbsp;neighbor&nbsp;e&nbsp;o&nbsp;ponto&nbsp;vizinho&nbsp;que&nbsp;esta&nbsp;a&nbsp;ser&nbsp;testado&nbsp;<br>
@return&nbsp;a&nbsp;distancia&nbsp;em&nbsp;linha&nbsp;reta&nbsp;do&nbsp;ponto&nbsp;neighbor&nbsp;ao&nbsp;ponto&nbsp;END_POINT</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = '12551 Pedro Santos &amp; 12552 Emanuel Teixeira'<br>
<strong>__date__</strong> = '11 de Maio de 2014'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">12551&nbsp;Pedro&nbsp;Santos&nbsp;&amp;&nbsp;12552&nbsp;Emanuel&nbsp;Teixeira</td></tr></table>
</body></html>